<!doctype html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <title></title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="/static/css/bootstrap.css" rel="stylesheet" type="text/css" media="all"/>
    <link href="/static/css/stack-interface.css" rel="stylesheet" type="text/css" media="all"/>
    <link href="/static/css/theme.css" rel="stylesheet" type="text/css" media="all"/>
    <link href="/static/css/custom.css" rel="stylesheet" type="text/css" media="all"/>

</head>

<body data-smooth-scroll-offset="77">
<div class="nav-container"></div>
<div class="main-container">
    <section class="space--sm">
        <div class="container">
            <div class="row justify-content-center">
                <div class="col-md-10 col-lg-8">
                    <div class="masonry masonry-blog-list">
                        <hr>
                        <div class="masonry__container masonry--active">

                            <div class="container">
                                <div class="row text-block">
                                    <div class="col-md-12">
                                        <h3>欢迎查看频道</h3>
                                    </div>
                                </div>
                                <div class="row">
                                    {% for foo in page_object.object_list %}
                                        <div class="col-md-4">
                                            <article class="feature feature-1">
                                                <a href="#" class="block"> <img alt="Image"
                                                                                src="/static/image/bgshowchannel.webp"></a>
                                                <div class="feature__body boxed boxed--border" style="height:178px;">
                                                    <span>{{ foo.channel_name }}</span>
                                                    <p style="font-size: 10px">{{ foo.channel_desc|truncatechars:50 }}</p>
                                                    <a href="{% url "Channel:viewchannel" %}?channel_name={{ foo.channel_name }}&channel_wirter={{ foo.channel_user.username }}">
                                                        查看频道
                                                    </a>
                                                </div>
                                            </article>
                                        </div>
                                    {% endfor %}


                                </div>
                            </div>
                            {% if page_object.has_previous %}
                                <div class="pagination"><a class="pagination__prev"
                                                           href="{% url "Channel:indexchannellist" %}?page={{ page_object.previous_page_number }}"
                                                           title="Previous Page">«</a>
                            {% else %}
                                <div class="pagination"><a class="pagination__prev"  title="Previous Page">«</a>
                            {% endif %}
                            <ol>

                                {% for page_index in page_range %}
                                    {% ifequal page_index page_object.number %}
                                        <li style="background-color: #2C7EEA">
                                            <a href="{% url "Channel:indexchannellist" %}?page={{ page_index }}">{{ page_index }}</a>
                                        </li>
                                    {% else %}
                                        <li>
                                            <a href="{% url "Channel:indexchannellist" %}?page={{ page_index }}">{{ page_index }}</a>
                                        </li>
                                    {% endifequal %}
                                {% endfor %}

                            </ol>
                            {% if page_object.has_next %}

                                    <a class="pagination__next"
                                       href="{% url "Channel:indexchannellist" %}?page={{ page_object.next_page_number }}"
                                       title="Next Page">»</a>

                            {% else %}

                                    <a class="pagination__next"  title="Next Page">»</a>

                            {% endif %}
                            </div>

                            </div>


                        </div>
                    </div>
                </div>
    </section>
</div>
<script src="/static/js/jquery-3.1.1.min.js"></script>
<script src="/static/js/parallax.js"></script>
<script src="/static/js/isotope.min.js"></script>
<script src="/static/js/smooth-scroll.min.js"></script>
<script src="/static/js/scripts.js"></script>

</body>

</html>